package com.knight.study.patterns.tujie.abstractFactory;

import java.util.Iterator;

/**
 * @Author knight
 * @Date 2024/9/11 10:53
 */

public class ListTray extends Tray{
    public ListTray(String caption) {
        super(caption);
    }

    @Override
    public String makeHtml() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("<li>\n");
        buffer.append(caption + "\n");
        buffer.append("<ul>\n");
        final Iterator it = tray.iterator();
        while (it.hasNext()) {
            Item item = (Item) it.next();
        }
        return buffer.toString();
    }
}
